<template>
    <h1>ChildEventModel</h1>
    搜索：<input type="text" v-model="searchText">
</template>

<script>
export default {
    data() {
        return {
            searchText: ""
        }
    },
    //侦听器
    watch: {
        searchText(newValue, oldValue) {
            console.log(newValue, oldValue);
            this.$emit("search", newValue);
        }
    }
}
</script>